(function($){
	
	$(function(){
		
		//获取城市信息
		var $form_name = $('.tx-datamintsfeuser-pi1 form').attr('name');
		var $url = $('.tx-datamintsfeuser-pi1 form').attr('action');
		//alert($form_name);
		if($('select[name="'+$form_name+'[zone]"]').length > 0 && $('select[name="'+$form_name+'[city]"]').length > 0){
			$('select[name="'+$form_name+'[zone]"]').bind('change',function(){
				var $zone = $('select[name="'+$form_name+'[zone]"]').val();
				$.ajax({
					type: "GET",
					url: $url,
					data: "tx_datamintsfeuser_pi1[ajaxcity]=1&tx_datamintsfeuser_pi1[zone]="+$zone,
					timeout: function(){
						alert('请求超时');
					},
					success: function(data){
						var $info = $.parseJSON(data);
						$('select[name="'+$form_name+'[city]"]').html($info);
					}
				});
			});
		}
        
	});

})(jQuery);

